package org.tarena.note;
import java.sql.SQLException;

import javax.annotation.Resource;

import org.apache.commons.dbcp.BasicDataSource;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.tarena.note.dao.UserMapperDao;


public class TestAC {
	@Resource
	private UserMapperDao dao;
	public static void main(String[] args) throws Exception {
		String conf = "applicationContext.xml";
		ApplicationContext ac = new ClassPathXmlApplicationContext(conf);
		BasicDataSource db = ac.getBean("dbcp",BasicDataSource.class);
		System.out.println("success"+db.getConnection());
	}
}
